<template>
  <div>
    <NavType/>
    <List/>
    <Recommend/>
    <Rank/>
    <Like/>
    <Floor v-for="floor in floorList" :key="floor.id" :floor="floor"/>
    <Brand/>

  </div>
</template>

<script>
import {requestFloorList} from "@/api"
import List from "./List"
import Recommend from "./Recommend"
import Rank from "./Rank"
import Like from "./Like"
import Floor from "./Floor"
import Brand from "./Brand"
export default {
    name:"Home",
    components:{
    List,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand
    },
    data(){
      return{
        floorList:[]
      }
    },
    methods:{
    //请求floor的数据，遍历生成floor组件
       async getFloorList(){
       const result =  await requestFloorList()
          this.floorList= result
       }
    },
    mounted(){
      this.getFloorList()
    }
}
</script>

<style lang="less" scoped>

</style>